#include <stdio.h>

//https://leetcode.cn/problems/rotate-array/

void swap(int* A, int* B) {
    (*A) ^= (*B);
    (*B) ^= (*A);
    (*A) ^= (*B);
}

void reverse(int* nums, int start, int end) {
    while (start < end) {
        swap(&nums[start++], &nums[end--]);
    }
}

void rotate(int* nums, int numsSize, int k) {
    k %= numsSize;
    reverse(nums, 0, numsSize - 1);
    reverse(nums, 0, k - 1);
    reverse(nums, k, numsSize - 1);
}

int main() {

    return 0;
}